<template>
  <header>
    <div class="logo">
      <span @click="goBack"><</span>
    </div>
    <div class="search">
      <i class="iconfont icon-sousuo"></i>
      <!-- <span>搜索您喜欢的产品...</span> -->
      <form action="" onsubmit="return false">
        <input type="search" placeholder="搜索您喜欢的..." @click="goSearch"/>
      </form>
    </div>
    <div class="kefu">
      <img src="../../../public/images/home.png" alt="">
    </div>
  </header>
</template>

<script>
export default {
    name:'listHeader',
    methods:{
        goBack(){
            this.$router.back()
        },
        goSearch(){
          this.$router.push({
            path:'/search'
          })
        },
    }
};
</script>

<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #b0352f;
  width: 100vw;
  height: 1.2rem;
}
.logo {
  width: 50px;
  height: 100%;
}
.logo span {
  display: block;
  text-align: center;
  line-height: 1.2rem;
  font-size: 30px;
  color: #eee;
}
.search {
  font-size: 14px;
  display: flex;
  align-items: center;
  width: 240px;
  height: 30px;
  background-color: #fff;
  border-radius: 15px;
  color: #ccc;
  flex: 1;
}

.search i {
  padding: 0 10px;
}
.search input {
  border: 0;
  outline: none;
  width: 120%;
  font-size: 14px;
}
.kefu {
  height: 100%;
  width: 50px;
  margin-right: 5px;
display: flex;
justify-content: center;
align-items: center;
}
.kefu img{
    width: 35px;
    height: 35px;
  }
</style>